package com.ruoyi.shortplay.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shortplay.mapper.VideoCoverKeyMapper;
import com.ruoyi.shortplay.domain.VideoCoverKey;
import com.ruoyi.shortplay.service.IVideoCoverKeyService;

/**
 * AI封面关键字Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-18
 */
@Service
public class VideoCoverKeyServiceImpl implements IVideoCoverKeyService 
{
    @Autowired
    private VideoCoverKeyMapper videoCoverKeyMapper;

    /**
     * 查询AI封面关键字
     * 
     * @param id AI封面关键字主键
     * @return AI封面关键字
     */
    @Override
    public VideoCoverKey selectVideoCoverKeyById(Long id)
    {
        return videoCoverKeyMapper.selectVideoCoverKeyById(id);
    }

    /**
     * 查询AI封面关键字列表
     * 
     * @param videoCoverKey AI封面关键字
     * @return AI封面关键字
     */
    @Override
    public List<VideoCoverKey> selectVideoCoverKeyList(VideoCoverKey videoCoverKey)
    {
        return videoCoverKeyMapper.selectVideoCoverKeyList(videoCoverKey);
    }

    /**
     * 新增AI封面关键字
     * 
     * @param videoCoverKey AI封面关键字
     * @return 结果
     */
    @Override
    public int insertVideoCoverKey(VideoCoverKey videoCoverKey)
    {
        videoCoverKey.setCreateTime(DateUtils.getNowDate());
        return videoCoverKeyMapper.insertVideoCoverKey(videoCoverKey);
    }

    /**
     * 修改AI封面关键字
     * 
     * @param videoCoverKey AI封面关键字
     * @return 结果
     */
    @Override
    public int updateVideoCoverKey(VideoCoverKey videoCoverKey)
    {
        videoCoverKey.setUpdateTime(DateUtils.getNowDate());
        return videoCoverKeyMapper.updateVideoCoverKey(videoCoverKey);
    }

    /**
     * 批量删除AI封面关键字
     * 
     * @param ids 需要删除的AI封面关键字主键
     * @return 结果
     */
    @Override
    public int deleteVideoCoverKeyByIds(Long[] ids)
    {
        return videoCoverKeyMapper.deleteVideoCoverKeyByIds(ids);
    }

    /**
     * 删除AI封面关键字信息
     * 
     * @param id AI封面关键字主键
     * @return 结果
     */
    @Override
    public int deleteVideoCoverKeyById(Long id)
    {
        return videoCoverKeyMapper.deleteVideoCoverKeyById(id);
    }
}
